#include "gameboarditem.h"
#include "gameboardorganizer.h"
#include "gametable.h"
#include "gamewindow.h"
#include "windowskin.h"




//Game Board Item
GameBoardItem::GameBoardItem(GameBoardOrganizer *parent)
    :QGraphicsObject(parent), _board(parent)
{
}

GameBoardItem::GameBoardItem(GameBoardOrganizer *board, GameBoardItem* parent)
    :QGraphicsObject(parent), _board(board)
{
}


GameDialogManager* GameBoardItem::getDialogManager(){
    return _board->getGameTable()->getGameWindow()->getDialogs();
}

//Game board item button
GameBoardItemButton::GameBoardItemButton(GameBoardOrganizer *parent)
    :GameBoardItem(parent)
{
    setAcceptHoverEvents(true);
}

GameBoardItemButton::GameBoardItemButton(GameBoardOrganizer *parent, GameBoardItem *)
    :GameBoardItem(parent)
{

}

void GameBoardItemButton::mousePressEvent(QGraphicsSceneMouseEvent *event){

}

void GameBoardItemButton::hoverEnterEvent(QGraphicsSceneHoverEvent *event){

}

//GameBoard Frame

GameBoardFrame::GameBoardFrame(QGraphicsObject *parent, int w, int h)
    :QGraphicsObject(parent), _w(w), _h(h)
{
}

QRectF GameBoardFrame::boundingRect() const{
    return QRectF(-_w/2, -_h/2, _w, _h);
}

void GameBoardFrame::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget){

}

